import service from '../index'

// 推荐视频
export function recommendVideo(url, params) {
  return new Promise((resolve, reject) => {
    service.get(url, {
      params
    }).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err)
    })
  })
}

// MV (视频详情需要登录)
export function MV(url, params) {
  return new Promise((resolve, reject) => {
    service.get(url, {
      params
    }).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err)
    })
  })
}

// 视频URL
export function videoURL(url, params) {
  return new Promise((resolve, reject) => {
    service.get(url, {
      params
    }).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err)
    })
  })
}

// 相关视频
export function relationVideo(url, params) {
  return new Promise((resolve, reject) => {
    service.get(url, {
      params
    }).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err)
    })
  })
}